import tensorflow as tf
from tensorflow.keras import layers, Sequential

x = tf.random.normal([4, 28*28])

# 使用Sequential容器
model = Sequential([
    layers.Dense(256, activation=tf.nn.relu),
    layers.Dense(128, activation=tf.nn.relu),
    layers.Dense(64, activation=tf.nn.relu),
    layers.Dense(10, activation=None)
])
out = model(x)
print(out)